{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "219373c5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2021-09-27 22:36:03\n",
      "晚上没有课噢，请记得及时完成作业噢！\n"
     ]
    }
   ],
   "source": [
    "#1.输出时间，让具体的星期和小时转成可以被判断的条件。\n",
    "import time\n",
    "print (time.strftime(\"%Y-%m-%d %H:%M:%S\", time.localtime()))#输出当前时间\n",
    "time= time.strftime(\"%H\")\n",
    "week_time = int(time)\n",
    "\n",
    "#int（）参数必须是字符串、类似字节的对象或数字,这里使用int（）是为了用于将一个字符串或数字转换为整型，方便我们在下面代码中判断时间。\n",
    "#属于time模块的要和datetime模块的区分开，不能全部塞在一起。\n",
    "\n",
    "import datetime\n",
    "day= datetime.datetime.today().weekday()\n",
    "week_day = int(day)\n",
    "\n",
    "#2.判断具体条件输出当前的课。\n",
    "if week_day == 0:\n",
    "    if week_time<12: \n",
    "        print(\"早上没有课噢，请好好休息吧！\")\n",
    "    if week_time in (12,18):\n",
    "        print(\"您只有下午一门课程：\")\n",
    "        print(\"时间：14：30-16：50 \")\n",
    "        print(\"地点：1-401\")\n",
    "        print(\"是高进老师的创业基础实践课哦！\")\n",
    "    if week_time>=18:\n",
    "        print(\"晚上没有课噢，请记得及时完成作业噢！\")\n",
    "elif week_day == 1:\n",
    "    if week_time<10:\n",
    "        print(\"您今天一共有四门课程，宝宝加油，第一门课程具体信息如下：\")\n",
    "        print(\"时间：8：00-9：30 \")\n",
    "        print(\"地点：体育馆西面\")\n",
    "        print(\"是牛晓梅老师的传统体育养生哦！\")\n",
    "    if week_time in (10,12):\n",
    "        print(\"您早上已上完一门课，还有一门课：\")\n",
    "        print(\"时间：10：35-12：00 \")\n",
    "        print(\"地点：7-402\")\n",
    "        print(\"是杨益孜老师的毛泽东思想和中国特色社会主义理论体系概论的实践课哦！\")\n",
    "    if week_time in (13,16):\n",
    "        print(\"您下午有一门课程：\")\n",
    "        print(\"时间：14：30-16：50 \")\n",
    "        print(\"地点：3实304\")\n",
    "        print(\"是胡美香老师的网站建设与运营的课哦！\")\n",
    "    if week_time in (17,20):\n",
    "        print(\"再坚持一下，晚上还有一门课QAQ\")\n",
    "        print(\"时间：18:45-20:10\")\n",
    "        print(\"地点：2-106\")\n",
    "        print(\"是曾诗楠老师的摄影作品鉴赏课哦！\")\n",
    "    if week_time>=20:\n",
    "        print(\"没课了没课了，赶紧回去睡觉吧宝QAQ\")\n",
    "        \n",
    "elif week_day == 2:\n",
    "    if week_time<12:\n",
    "        print(\"您今天一共有两门课程，第一门课程具体信息如下：\")\n",
    "        print(\"时间：9：45-12：00\")\n",
    "        print(\"地点：9-201\")\n",
    "        print(\"是周伟老师的毛泽东思想和中国特色社会主义理论体系概论课噢\")\n",
    "    if week_time in (12,20):\n",
    "        print(\"晚上还有一门课程噢！\")\n",
    "        print(\"时间：18：45-20:10\")\n",
    "        print(\"地点：10-305\")\n",
    "        print(\"是杨日红老师的英语课噢！请提前检查学习通是否有未完成作业！\")\n",
    "    if week_time>=20:\n",
    "        print(i)\n",
    "        print(\"没课啦！今晚去跑步吗？\")\n",
    "        \n",
    "elif week_day == 3:\n",
    "    if week_time<12:\n",
    "        print(\"您今天一共有两门课程，第一门课程具体信息如下：\")\n",
    "        print(\"时间：9:45-12:00\")\n",
    "        print(\"地点：综合楼612\")\n",
    "        print(\"是许智超老师的万恶的python课，请注意不要打瞌睡噢！ \")\n",
    "    if week_time in (12,18):\n",
    "        print(\"您下午还有一门课程\")\n",
    "        print(\"时间：16：10-18：35\")\n",
    "        print(\"地点：11-101\")\n",
    "        print(\"是马爱云老师的科学发展史！\")\n",
    "    if week_time>=18:\n",
    "        print(\"没课了哦，今晚去跑跑步吧！\")\n",
    "elif week_day == 4:\n",
    "    if week_time<9:\n",
    "        print(\"您今天一共有两门课程，都在上午，第一门课程的具体信息如下：\")\n",
    "        print(\"时间：8：00-9：30\")\n",
    "        print(\"地点：综合楼612\")\n",
    "        print(\"是阚凤霞老师的ai课哦！\")\n",
    "    if week_time in (9,12):\n",
    "        print(\"这周的最后一节课！\")\n",
    "        print(\"时间：10：35-12：00\")\n",
    "        print(\"地点：10-305\")\n",
    "        print(\"是杨日红老师的英语课，请不要打瞌睡哦！\")\n",
    "    if week_time>=12:\n",
    "        print(\"本周所有课程已结束，请及时完成作业，周末愉快！\")\n",
    "else:\n",
    "    print(\"今天是周末，没有课噢！\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "099b7751",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
